home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / Updates / AddOns / VowaData / Register / Register-VorwahlenGui next >
Text File  |  1999-12-30  |  4KB  |  172 lines

  1. /*
  2. **
  3. **    $VER: RegisterVorwahlenGUI © Yves Grabowsky
  4. **
  5. */
  6.  
  7. /* add libs */
  8. call addlib("tritonrexx.library",0,-30)
  9. call addlib("rexxtricks.library",0,-30)
  10. call addlib("rexxreqtools.library",0,-30)
  11.  
  12. /* options */
  13. OPTIONS RESULTS
  14.  
  15. /* pos var */
  16. pos = "rt_reqpos=reqpos_centerscr"
  17.  
  18. /* define lists */
  19. rate.0 = 6
  20. rate.1 = "1"
  21. rate.2 = "2"
  22. rate.3 = "3"
  23. rate.4 = "4"
  24. rate.5 = "5"
  25. rate.6 = "6"
  26.  
  27. /* create app */
  28. app = TR_CreateApp('TRCA_Name RegisterVorwahlenGUI')
  29.  
  30. /* define window */
  31. win = WindowID('1'),
  32.       WindowTitle('Registrierung für VorwahlenGUI'),
  33.       ScreenTitle('RegisterVorwahlenGUI © Yves Grabowsky'),
  34.       WindowPosition('TRWP_Centerscreen'),
  35.       VertGroupA,
  36.          Space,
  37.          NamedSeparator('Registrierung für VorwahlenGUI'),
  38.          Space,
  39.          HorizGroupA,
  40.             Space,
  41.             GroupBox,
  42.             HorizGroupA,
  43.                Space,
  44.                VertGroupA,
  45.                   Space,
  46.                   CenteredText("Danke das Sie sich registrieren lassen möchten!"),
  47.                   Space,
  48.                   TextN("VorwahlenGUI das Telefonbuch für Ihren Amiga!"),
  49.                   Space,
  50.                Endgroup,
  51.                Space,
  52.             Endgroup,
  53.             Space,
  54.          Endgroup,
  55.          Space,
  56.          HorizGroupA,
  57.             Space,
  58.             TextN('Name:        '),
  59.             Space,
  60.             StringGadget('','5'),
  61.             Space,
  62.          Endgroup,
  63.          Space,
  64.          HorizGroupA,
  65.             Space,
  66.             TextN('Emailaddress:'),
  67.             Space,
  68.             StringGadget('','6'),
  69.             Space,
  70.          Endgroup,
  71.          Space,
  72.          HorizGroupA,
  73.             Space,
  74.             TextN('Street:      '),
  75.             Space,
  76.             Stringgadget('','7'),
  77.             Space,
  78.          Endgroup,
  79.          Space,
  80.          HorizGroupA,
  81.             Space,
  82.             TextN('City:        '),
  83.             Space,
  84.             StringGadget('','8'),
  85.             Space,
  86.          Endgroup,
  87.          Space,
  88.          HorizGroupA,
  89.             Space,
  90.             TextN('Country:     '),
  91.             Space,
  92.             StringGadget('','9'),
  93.             Space,
  94.          Endgroup,
  95.          Space,
  96.          HorizGroupA,
  97.             Space,
  98.             TextN('How do you like it:'),
  99.             Space,
  100.             CycleGadget(rate,'0','10'),
  101.             Space,
  102.          Endgroup,
  103.          Space,
  104.          HorizGroupA,
  105.             Space,
  106.             Button('Register me','11'),
  107.             Space,
  108.             Button('Cancel','12'),
  109.             Space,
  110.          Endgroup,
  111.          Space,
  112.       Endgroup,
  113.       Endproject
  114.  
  115. /* open project */
  116. project = TR_OpenProject(app,win)
  117.  
  118. DO WHILE exit ~= 1
  119.    CALL TR_Wait(app,'')
  120.    DO WHILE TR_HandleMsg(app,event)
  121.       IF event.trm_id = '11' then do
  122.          exit = 1
  123.          end
  124.       IF event.trm_class = "TRMS_CLOSEWINDOW" then do
  125.          signal quit
  126.          end
  127.       IF event.trm_id = '12' then do
  128.          signal quit
  129.          end
  130.       end
  131.    end
  132.  
  133. /* read values */
  134. name = TR_GetAttribute(project,'5','TROB_String')
  135. email = TR_GetAttribute(project,'6','TROB_String')
  136. street = TR_GetAttribute(project,'7','TROB_String')
  137. city = TR_GetAttribute(project,'8','TROB_String')
  138. country = TR_GetAttribute(project,'9','TROB_String')
  139. rating = TR_GetAttribute(project,'10','TRAT_Value')
  140. rating = rating+1
  141.  
  142. reg.0 = 10
  143. reg.1 = "Hallo Michael!"
  144. reg.2 = "Ich möchte mich als Benutzer von VorwahlenGUI registrieren lassen!"
  145. reg.3 = ""
  146. reg.4 = "Name:" name
  147. reg.5 = "eMailaddress:" email
  148. reg.6 = "Street:" street
  149. reg.7 = "City:" city
  150. reg.8 = "Country:" country
  151. reg.9 = "My rating:" rating
  152. reg.10 = "Program: VorwahlenGUI"
  153.  
  154. CALL WRITEFILE('T:register.tmp',reg)
  155.  
  156. IF show('P','YAM') then do
  157.    ADDRESS YAM
  158.    MAILWRITE
  159.    WRITESUBJECT "VorwahlenGUI-Registrierung"
  160.    WRITETO "m.luense@t-online.de"
  161.    WRITELETTER "T:register.tmp"
  162.    WRITEQUEUE
  163.    end
  164. ELSE do
  165.    call rtezrequest("Sie müssen erst Yam starten!!!",,"Error...",pos)
  166.    end
  167.  
  168. quit:
  169. CALL TR_CloseProject(project)
  170. CALL TR_DeleteApp(app)
  171. exit
  172.